/**
 * jims
 */
package com.jims.master.modules.doctor.service;

import com.jims.master.common.service.CrudService;
import com.jims.master.modules.doctor.dao.ExamItemDao;
import com.jims.master.modules.doctor.entity.ExamItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 检查申请明细Service
 * @author 陈晓阳
 * @version 2017-03-14
 */
@Service
@Transactional(readOnly = true)
public class ExamItemService extends CrudService<ExamItemDao, ExamItem> {

    @Autowired
    private ExamItemDao examItemDao;


    @Transactional(readOnly = false)
    public int save(ExamItem examItem) {
        return super.save(examItem);
    }

    /**
     * 根据申请主表Id删除明细
     * @param applyId
     * @return
     * @author 陈晓阳
     */
    @Transactional(readOnly = false)
    public int deleteByApplyId(String applyId) {
        return this.examItemDao.deleteByApplyId(applyId);
    }
    public List findAllItems(String applyId){
        return this.examItemDao.findAllItems(applyId);
    }
}